#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n, m;
	cin >> n >> m;
//	int dp[31][31];// 尾数+1，为了下面
//	memset(dp, 0, sizeof(dp)); // 全部设为零
////	为了方便，把1，1设为起点
//	dp[1][1] = 1;
//	for (int i = 1; i <= n; i++) {
//		for (int j = 1; j <= m; j++) {
//			if ( i == 1 && j == 1) {
//				continue;
//			}
//			if (i % 2 == 0 && j % 2 == 0) {
//				dp[i][j] = 0;
//			} else {
//				dp[i][j] = dp[i - 1][j] + dp[i][j - 1];
//			}
////			cout << dp[i][j];
////			cout << "====================" << endl;
////			for (int i = 1; i <= n; i++) {
////				for (int j = 1; j <= m; j++) {
////					cout << dp[i][j] << " ";
////				}
////				cout << endl;
////			}
//		}
//	}
//	cout << dp[n][m] << endl;
	int *arr = new int[(n + 1) * (m + 1)];
	memset(arr, 0, (m + 1) * (n + 1) * 4);
	arr[(1 ) * (m + 1) + 1] = 1;
	for (int i = 1; i <= n; i++) {
		for (int j = 1; j <= m; j++) {
			if (i == 1 && j == 1) {
				continue;
			}
			if (i % 2 == 0 && j % 2 == 0) {
				continue;
			}
			arr[i * (m + 1) + j] = arr[(i - 1) * (m + 1) + j] + arr[i * (m + 1) + j - 1];
		}
	}
	cout << arr[n * (m + 1) + m];
	return 0;
}
